#ifndef _LIST_H_
#define _LIST_H_


#define iterator 0
#define reverse_iterator 1
#define ture 1
#define false 0

template<class T>
typedef struct listNode{
	T data;
	listNode<T> *pre;
	listNode<T> *next;

	listNode(listNode<T> *ptr = NULL) {next = ptr;}
}listNode;


typedef struct listIter{
	listNode *next;
	int direction;
}listIter;

template<class T> 
class list
{
	private :
		listNode<T>    *head;
		listNode<T>    *tail;
		unsigned int   len;
	public:
		list(){};
		~list(){};
		void clear();
		int length() const;
		void sort();
		void reverse();
		bool Isempty() const;
		void Print()  const;
		void push_front(T *value);
};
	
#endif
